home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-094.TXT < prev    next >
Encoding:
Text File  |  1992-06-30  |  42.5 KB  |  1,234 lines

  1. C.S.M.P. Digest             Tue, 26 May 92       Volume 1 : Issue 94
  2.  
  3. Today's Topics:
  4.  
  5.     Serial Line from Sun To Mac
  6.     The death of TEInsert when memory lacks
  7.     Apple Installer and Compression
  8.     Mac IIfx advice wanted
  9.     Is it possible to dim a list box item
  10.     Power Book Slow Mode
  11.     "Low Memory" Situatiojn
  12.     Creating interface -- help!!!
  13.     mpw 3.2 c++/cfront 2.0 question
  14.     Think Reference Question (Experiences?)
  15.     Something to smirk about
  16.     Determining the size of a file - SFGetfile
  17.  
  18.  
  19. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  20.  
  21. These digests are available (by using FTP, account anonymous, your email
  22. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  23. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  24. Questions list.  The last several issues of the digest are available from
  25. sumex-aim.stanford.edu as well.
  26.  
  27. These digests are also available via email.  Just send a note saying that you
  28. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  29. automatically receive each new digest as it is created.
  30.  
  31. The digest is a collection of articles from the internet newsgroup comp.sys.
  32. mac.programmer.  It is designed for people who read c.s.m.p. semi-regularly
  33. and want an archive of the discussions.  If you don't know what a newsgroup
  34. is, you probably don't have access to it.  Ask your systems administrator(s)
  35. for details.  (This means you can't post questions to the digest.)
  36.  
  37. The articles in these digests are taken directly from comp.sys.mac.programmer.
  38. They are not edited; all articles included in this digest are in their original
  39. posted form.  The only articles that are -not- included in these digests are
  40. those which didn't receive any replies (except those that give information
  41. rather than ask a question).  All replies to each article are concatenated
  42. onto the original article in the order in which they were received.  Article
  43. threads are not added to the digests until the last article added to the
  44. thread is at least one month old (this is to ensure that the thread is dead
  45. before adding it to the digests).
  46.  
  47. Send administrative mail to mkelly@cs.uoregon.edu.
  48.  
  49. -------------------------------------------------------
  50.  
  51. From: vincent@osc.osc.com (Vincent Tong)
  52. Subject: Serial Line from Sun To Mac
  53. Date: 14 Apr 92 23:51:24 GMT
  54. Organization: Versant Object Technology, Menlo Park, CA
  55.  
  56. Hi, I'm trying to transfer some data across a serial line
  57. from a Sun to Mac.  Anyone knows if there are any problems
  58. with this?  If not, is there any sample code out there that I could 
  59. look at?
  60.  
  61. Thanks in advance
  62.  
  63. Vincent
  64.  
  65. +++++++++++++++++++++++++++
  66.  
  67. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  68. Date: 25 Apr 92 18:35:39 GMT
  69. Organization: Dartmouth College, Hanover, NH
  70.  
  71. In article <5486@osc.COM>
  72. vincent@osc.osc.com (Vincent Tong) writes:
  73.  
  74. > I'm trying to transfer some data across a serial line
  75. > from a Sun to Mac.  Anyone knows if there are any problems
  76. > with this?
  77.  
  78. The easiest wat I know to do this is to use a communications program.
  79. There was an article on this in the last MacUser.
  80.  
  81. Hope this helps,
  82. Jeremiah
  83.  
  84. ---------------------------
  85.  
  86. From: braun-eric@CS.YALE.EDU (Eric E. Braun)
  87. Subject: The death of TEInsert when memory lacks
  88. Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158
  89. Date: Sat, 25 Apr 1992 12:49:34 GMT
  90.  
  91. Has anybody had trouble getting TEInsert to work in low memory
  92. situations?  At times I am seeing garbage characters drawn on the
  93. screen and the insert fails.  This is allways correlated with low memory
  94. but its not any obvious how low.  I would expect it to be when its
  95. less than the ammount of the insert or less than twice the ammount of
  96. the insert incase it needs to make a copy, but it's niether!
  97.  
  98. Hints clues?
  99.  
  100. Thanks
  101.  
  102. - -- 
  103. - -------------------------------------------------------------------------------
  104. Eric E. Braun                        braun@zoo.cs.yale.edu
  105.  
  106. +++++++++++++++++++++++++++
  107.  
  108. From: nagle@netcom.com (John Nagle)
  109. Date: Sat, 25 Apr 92 18:38:20 GMT
  110. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  111.  
  112. braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  113.  
  114. >Has anybody had trouble getting TEInsert to work in low memory
  115. >situations?  At times I am seeing garbage characters drawn on the
  116. >screen and the insert fails.  This is allways correlated with low memory
  117. >but its not any obvious how low.  I would expect it to be when its
  118. >less than the ammount of the insert or less than twice the ammount of
  119. >the insert incase it needs to make a copy, but it's niether!
  120.  
  121.         TEInsert also fails if it pushes the size of the edit object
  122. over 32767 bytes.  The action taken on overflow is to trash memory.
  123. This last is not documented in IM.
  124.  
  125.  
  126.                     John Nagle
  127.  
  128. ---------------------------
  129.  
  130. From: neal@farallon.com (Neal Trautman)
  131. Subject: Apple Installer and Compression
  132. Date: 14 Apr 92 13:25:34 GMT
  133. Organization: Farallon Computing, Inc.
  134.  
  135. I need to compress some files to fit on a
  136. single diskette.  I also need to use Apple's
  137. Installer to do auto-decompression and installation.
  138.  
  139. The only product I have heard of is VISE.
  140. I don't think any of the other standard
  141. compression utilities, StuffIt, Compact Pro, etc.
  142. offer decompression in Apple's Installer.
  143.  
  144. Are there any others?  Any recommendations?
  145. - --
  146. Neal Trautman
  147. Timbuktu Lead Software Engineer
  148. Farallon Computing, Inc.
  149. neal@farallon.com
  150.  
  151. +++++++++++++++++++++++++++
  152.  
  153. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  154. Date: 15 Apr 92 17:16:30 +1200
  155. Organization: University of Waikato, Hamilton, New Zealand
  156.  
  157. In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
  158.  
  159. > I don't think any of the other standard
  160. > compression utilities, StuffIt, Compact Pro, etc.
  161. > offer decompression in Apple's Installer.
  162.  
  163. I think they do. I recall installing something that used Apple's Installer
  164. and StuffIt compression, but I can't remember which application it was.
  165.  
  166. It wasn't Canvas... :-}
  167.  
  168. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  169. Computer Services Dept                     fax: +64-7-838-4066
  170. University of Waikato            electric mail: ldo@waikato.ac.nz
  171. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  172.  
  173. +++++++++++++++++++++++++++
  174.  
  175. From: jtgorman@cs.arizona.edu (J. Taggart Gorman)
  176. Date: 15 Apr 92 08:51:51 GMT
  177. Organization: None - Entire program eliminated due to budget cuts :)
  178.  
  179.  
  180. In article <1992Apr15.171630.7439@waikato.ac.nz>,
  181. Citizen ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes :
  182. >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
  183. >> I don't think any of the other standard
  184. >> compression utilities, StuffIt, Compact Pro, etc.
  185. >> offer decompression in Apple's Installer.
  186. >
  187. >I think they do. I recall installing something that used Apple's Installer
  188. >and StuffIt compression, but I can't remember which application it was.
  189. >
  190. >It wasn't Canvas... :-}
  191.  
  192.   Just installed Word 5.0 (no flames, please) today.
  193.  
  194.   It uses Apple's installer to place Word on your hard drive.  Thing is, it
  195. first copies _Stuffit Classic_ files to the hard drive, then uses "Stuffit
  196. Engine v1.3" (I think v1.3) to unstuff.
  197.  
  198. |--------------------------------| "I like it.  It's got that 'It's a cruel
  199. |      J. Taggart Gorman Jr.     |  world - Let's throw ourselves in the
  200. | jtgorman@caslon.cs.arizona.edu |  abyss.' type ambience."
  201. |--------------------------------|     - Christian Slater, in _Heathers_
  202.  
  203. +++++++++++++++++++++++++++
  204.  
  205. From: drc@claris.com (Dennis Cohen)
  206. Date: 15 Apr 92 13:57:25 GMT
  207. Organization: Claris Corporation, Santa Clara CA
  208.  
  209. ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  210.  
  211. >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
  212.  
  213. >> I don't think any of the other standard
  214. >> compression utilities, StuffIt, Compact Pro, etc.
  215. >> offer decompression in Apple's Installer.
  216.  
  217. >I think they do. I recall installing something that used Apple's Installer
  218. >and StuffIt compression, but I can't remember which application it was.
  219.  
  220. >It wasn't Canvas... :-}
  221.  
  222. You will have seen it in a number of products, including Claris Resolve and
  223. Microsoft Word 5.  Aladdin licenses the decompression/join atoms to developers
  224. and we code our installer scripts to run the atoms at the end of the install
  225. process (because you can only invoke action atoms at the start and end of, but
  226. not during, an installation).  Vise Technologies also provides compression/
  227. decompression for use with the Apple Installer -- Symantec's GreatWorks is
  228. one customer of this technology.
  229.  
  230. - -- 
  231. Dennis Cohen
  232. Claris Corp.
  233.  ****************************************************
  234. Disclaimer:  Any opinions expressed above are _MINE_!
  235.  
  236. +++++++++++++++++++++++++++
  237.  
  238. From: time@ice.com (Tim Endres)
  239. Date: 15 Apr 92 16:26:29 GMT
  240. Organization: ICE Engineering, Inc.
  241.  
  242.  
  243. In article <3625@caslon.cs.arizona.edu> (comp.sys.mac.programmer), jtgorman@cs.arizona.edu (J. Taggart Gorman) writes:
  244. > In article <1992Apr15.171630.7439@waikato.ac.nz>,
  245. > Citizen ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes :
  246. > >In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
  247. > >> I don't think any of the other standard
  248. > >> compression utilities, StuffIt, Compact Pro, etc.
  249. > >> offer decompression in Apple's Installer.
  250. > >
  251. > >I think they do. I recall installing something that used Apple's Installer
  252. > >and StuffIt compression, but I can't remember which application it was.
  253. > >
  254. > >It wasn't Canvas... :-}
  255. >   Just installed Word 5.0 (no flames, please) today.
  256. >   It uses Apple's installer to place Word on your hard drive.  Thing is, it
  257. > first copies _Stuffit Classic_ files to the hard drive, then uses "Stuffit
  258. > Engine v1.3" (I think v1.3) to unstuff.
  259.  
  260. The apple installer allows you to write an external code resource
  261. to provide any installation "function" you wish. It would not be a
  262. terribly difficult task to hook into the StuffIt engine with this.
  263.  
  264. tim.
  265.  
  266.  
  267. tim endres - time@ice.com  -or-  uupsi!tbomb!time
  268. ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
  269. 8840 Main Street, Whitmore Lake, MI  48189
  270. USENET - a slow moving self parody... ph
  271.  
  272. +++++++++++++++++++++++++++
  273.  
  274. From: Brent Schorsch
  275. Date: 18 Apr 92 02:30:11 GMT
  276. Organization: Occidental College, Los Angeles, CA.  USA
  277.  
  278. In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes:
  279. >I need to compress some files to fit on a
  280. >single diskette.  I also need to use Apple's
  281. >Installer to do auto-decompression and installation.
  282. >
  283. >The only product I have heard of is VISE.
  284. >I don't think any of the other standard
  285. >compression utilities, StuffIt, Compact Pro, etc.
  286. >offer decompression in Apple's Installer.
  287. >
  288. >Are there any others?  Any recommendations?
  289. >--
  290. >Neal Trautman
  291. >Timbuktu Lead Software Engineer
  292. >Farallon Computing, Inc.
  293. >neal@farallon.com
  294. >
  295.  
  296. Stuffit has a 'action atom' for apple's installer.
  297. (If you don't know what this is, check the installer manual,
  298. action atoms are what you would used to do the decompression)
  299. Salient (Disk Doubler) has their own installer which does 
  300. decompression.
  301.  
  302. hope this helps
  303. - -Brent
  304.  
  305. +++++++++++++++++++++++++++
  306.  
  307. From: jeff@wilder.com (Jeff Osborn)
  308. Organization: Wilder Systems/Trik Product Group
  309. Date: Thu, 16 Apr 1992 13:27:42 GMT
  310.  
  311. In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes:
  312. >I need to compress some files to fit on a
  313. >single diskette.  I also need to use Apple's
  314. >Installer to do auto-decompression and installation.
  315. >
  316. >The only product I have heard of is VISE.
  317. >I don't think any of the other standard
  318. >compression utilities, StuffIt, Compact Pro, etc.
  319. >offer decompression in Apple's Installer.
  320. >
  321. >Are there any others?  Any recommendations?
  322.  
  323. One possibility you may want to consider is NetDistributor.
  324. NetDistributor creates "packages" which are basically
  325. smart, self-expanding archives. These can either be sent
  326. over a network for automatic unattended installation or
  327. they can be placed on a server, floppy etc where, when
  328. double-clicked, they install files in the package 
  329. according to your instructions. Furthermore, packages
  330. can be compressed and we get slightly better compression
  331. than DiskDoubler and Compact Pro in most cases. 
  332.  
  333. Although we have concentrated primarily on the market
  334. for network-based software installation we are realizing
  335. more and more that we should be offering the smart
  336. package concept as well. The packages are MUCH easier
  337. to create than a similar set of instructions with
  338. Apple's Installer and with our new 2.0 version 
  339. you have all the same branching and file/resource 
  340. installation and deletion capabilities.
  341.  
  342. Given that you're also doing this for Timbuktu, it would
  343. seem that a package which can also be installed across
  344. the network would be a double-win. This is true for any
  345. developer whose product is used in a networked environment.
  346.  
  347. Throop Wilder (throop@wilder.com)
  348.  
  349.  
  350.  
  351. +++++++++++++++++++++++++++
  352.  
  353. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  354. Date: 25 Apr 92 19:27:35 GMT
  355. Organization: Dartmouth College, Hanover, NH
  356.  
  357. In article <258@farallonfarallon.com> neal@farallon.com (Neal Trautman)
  358. writes:
  359. >I need to compress some files to fit on a
  360. >single diskette.  I also need to use Apple's
  361. >Installer to do auto-decompression and installation.
  362. >
  363. >The only product I have heard of is VISE.
  364. >I don't think any of the other standard
  365. >compression utilities, StuffIt, Compact Pro, etc.
  366. >offer decompression in Apple's Installer.
  367.  
  368. I have no idea, but if you ask the folks at Deneba, they might tell you
  369. (Canvas 3.0 is compressed and uses the Apple Installer to decompress).
  370.  
  371. Good Luck,
  372. Jeremiah
  373.  
  374. ---------------------------
  375.  
  376. From: valentin@midnight-blue.cis.pitt.edu
  377. Subject: Mac IIfx advice wanted
  378. Date: 18 Apr 92 00:10:47 GMT
  379.  
  380.  
  381.  
  382. Hello, all. 
  383.  
  384. I have been given the task of developing/acquiring some mail software for 
  385. the Macintosh. As part of this project, I'm supposed to acquire a decent 
  386. Mac for development purposes. 
  387.  
  388. Two of the constraints on this system include 
  389.  
  390.     1) Must be able to develop System 6 and System 7 compatible
  391.        applications. 
  392.  
  393.     2) Must have a reasonably long useful life. 
  394.  
  395. I had originally settled on a Mac IIfx, since it is the fastest mac 
  396. that can run system 6 and system 7. However, it seems that Apple
  397. has discontinued this particular machine. Another department 
  398. has a Mac II fx for sale here. 
  399.  
  400. So I have some questions and I'd like some advice. 
  401.  
  402. Is there any potential problems that would cause the IIfx to 
  403. have a short useful lifespan? That is, will it continue to run 
  404. current software for a reasonable amount of time?  
  405.  
  406. How difficult is it to develop System 6-compatible applications
  407. on a System 7 machine? 
  408.  
  409. Am I correct in the first place that the Quadra will *not* 
  410. run system 6? 
  411.  
  412. Instead of going up to a Quadra, is it reasonable to go down to 
  413. a IIci or IIsi? 
  414.  
  415. Any help in this matter is GREATLY appreciated. I will summarize and post
  416. to the net. 
  417.  
  418. Thanks, 
  419. Shawn Hernan
  420. University of Pittsburgh
  421. valentin+@pitt.edu
  422. valentin@midnight-blue.cis.pitt.edu
  423.  
  424.  
  425. +++++++++++++++++++++++++++
  426.  
  427. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  428. Date: 25 Apr 92 18:57:49 GMT
  429. Organization: Dartmouth College, Hanover, NH
  430.  
  431. If you want a blisteringly fast Mac that will run Sys. 6 and 7, you
  432. might look into a CI with a 68040 cache card such as a Radius Rocket.
  433. With this configuration, you can get a mac faster than a Quadra (33
  434. MHz) plus the ability to run both Sys. 6 and 7 (the Quadras do require
  435. Sys. 7).
  436.  
  437. Hope this helps,
  438. Jeremiah
  439.  
  440. ---------------------------
  441.  
  442. From: dsb@mbunix.mitre.org
  443. Subject: Is it possible to dim a list box item
  444. Date: 20 Apr 92 11:29:47 GMT
  445. Organization: The MITRE Corporation
  446.  
  447. Is it possible to dim a list box item once the operator has clicked on the
  448. selection. Pointers
  449. to an example would be greatly appreciated.
  450. Thanks
  451. Scott
  452. - ------
  453. Scott Blodgett                         The MITRE Corporation
  454. dsb@mbunix.mitre.org                  Test and Integration
  455. Burlington Road, M/S G220         Bedford, MA 01730
  456. (617) 271 - 8740       
  457. "When I was your age I had to walk to the TV"  
  458.  
  459. +++++++++++++++++++++++++++
  460.  
  461. From: jpurlia@qualcomm.com (John Purlia)
  462. Date: 20 Apr 92 16:44:28 GMT
  463. Organization: Qualcomm Incorporated
  464.  
  465. In article <1992Apr20.112947.28325@linus.mitre.org>, dsb@mbunix.mitre.org writes:
  466. > Is it possible to dim a list box item once the operator has clicked on the
  467. > selection. Pointers
  468. > to an example would be greatly appreciated.
  469.  
  470. Yes.  However, you can't do this using the default LDEF supplied to you by
  471. the List Manager.  All you have to do is write your own LDEF that draws cells
  472. and handles mouse clicks.  There is a very good example of an LDEF that
  473. draws sicn's before a list item on the developer's CD.
  474.  
  475. Good luck!
  476.  
  477. ..........................................................................
  478. John Purlia          : My brain; not my company's brain.  My brain says...
  479. jpurlia@qualcomm.com :      "Just about any movie could be made better
  480. AOL:  <Jpurlia>      :       if one of the characters were a vampire."
  481. ..........................................................................
  482.  
  483. +++++++++++++++++++++++++++
  484.  
  485. From: zobkiw@world.std.com (Joe Zobkiw)
  486. Organization: The World Public Access UNIX, Brookline, MA
  487. Date: Fri, 24 Apr 1992 20:31:00 GMT
  488.  
  489. To disable some text (within your own LDEF) you should use (under 7.x) the
  490. TextMode(grayishTextOr) call. This will automatically draw "disabled" text
  491. for you in true gray if the machine is in color or in dithered gray if not.
  492.  
  493. ...
  494. TextMode(grayishTextOr);   // set up gray text mode
  495. DrawText(...);             // draw some text
  496. TextMode(srcOr);           // restore default value
  497. ...
  498.  
  499. - -- 
  500. - -- joe zobkiw                             Internet: zobkiw@world.std.com
  501. - --                                             AOL: AFL Zobkiw  
  502. - -- mac.synthesis.MIDI.THINK C.OOP.asm          CI$: 70712,515 
  503. - -- communications.networks.cool tunes...
  504.  
  505. ---------------------------
  506.  
  507. From: jerome@ee.fit.edu (Jerome Chan)
  508. Subject: Power Book Slow Mode
  509. Date: 21 Apr 92 16:25:30 GMT
  510. Organization: Florida Tech, CP/EE Dept.
  511.  
  512. It seems that when the powerbook (model 140) slows
  513. down after a period of inactivity (keyboard/mouse)
  514.  
  515. Is there a software workaround for this?
  516.  
  517. What system calls should I use?
  518.  
  519.  
  520. - --
  521.  The Evil Tofu
  522.  
  523.  
  524. +++++++++++++++++++++++++++
  525.  
  526. From: jmunkki@hila.hut.fi (Juri Munkki)
  527. Date: 25 Apr 92 15:06:08 GMT
  528. Organization: Helsinki University of Technology, Finland
  529.  
  530. In article <jerome.703873530@yacht> jerome@ee.fit.edu (Jerome Chan) writes:
  531. >It seems that when the powerbook (model 140) slows
  532. >down after a period of inactivity (keyboard/mouse)
  533. >
  534. >Is there a software workaround for this?
  535. >
  536. >What system calls should I use?
  537.  
  538. It sometimes helps to have all the Inside Macintosh volumes at hand.
  539. Try reading the power manager chapter of Inside Macintosh VI. If you
  540. can't afford all those books, subscribe to Develop and find a CD-ROM
  541. drive so you can copy the material from the CD-ROM that comes with
  542. the magazine.
  543.  
  544. There are several ways to keep the processor going at full steam.
  545.  
  546.    ____________________________________________________________________________
  547.   / Juri Munkki        /  Helsinki University of Technology   /  Wind  / Project /
  548.  / jmunkki@hut.fi  /  Computing Center Macintosh Support  /  Surf  / Arashi  /
  549.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  550.  
  551. +++++++++++++++++++++++++++
  552.  
  553. From: s442070@nexus.yorku.ca (Tomas Hansson)
  554. Organization: York University, Toronto, Canada
  555. Date: Sat, 25 Apr 1992 21:42:12 GMT
  556.  
  557. In article <1992Apr25.150608.25434@nntp.hut.fi> jmunkki@hila.hut.fi (Juri Munkki) writes:
  558. >In article <jerome.703873530@yacht> jerome@ee.fit.edu (Jerome Chan) writes:
  559. >>It seems that when the powerbook (model 140) slows
  560. >>down after a period of inactivity (keyboard/mouse)
  561. >>
  562. >>Is there a software workaround for this?
  563. >>
  564. >>What system calls should I use?
  565. >
  566. >It sometimes helps to have all the Inside Macintosh volumes at hand.
  567. >Try reading the power manager chapter of Inside Macintosh VI. If you
  568. >can't afford all those books, subscribe to Develop and find a CD-ROM
  569. >drive so you can copy the material from the CD-ROM that comes with
  570. >the magazine.
  571. >
  572. >There are several ways to keep the processor going at full steam.
  573.  
  574. And the easiest one is probably to read the manual and use the portable
  575. control panel... Acording to the manual, the rest mode is suppose to reset
  576. itself to "Rest" everytime you restart. I have found that this is not the
  577. case and the setting remains until the next time you change it!
  578.  
  579. /Tomas
  580. s442070@nexus.yorku.ca
  581.  
  582.  
  583.  
  584. ---------------------------
  585.  
  586. Subject: "Low Memory" Situatiojn
  587. From: Christopher Tate <CXT105@psuvm.psu.edu>
  588. Date: Tuesday, 21 Apr 1992 14:39:43 EDT
  589. Organization: Penn State University
  590.  
  591. In article <703876338.F00001@blkcat.UUCP>,
  592. Jeffrey.Licht@p4212.f70.n109.z1.fidonet.org (Jeffrey Licht) says:
  593. >
  594. >  JH> Don't some people in memory low situations (e.g. 4 MB MacPlus and
  595. >  JH> system 7) have
  596. >
  597. >You have a strange idea of a "low memory" situation.  4 megs on a toaster Mac s
  598. >is
  599. >quite enough for any kind of normal use.  2 megs, on the other hand...
  600.  
  601. Qu'a tu??
  602.  
  603. (Loose translation: "What kind of space drugs are you on?" :-)
  604.  
  605. I'd claim that it all depends on how you define "normal" use; I myself
  606. tend to call just about anything "normal," by the argument that if I
  607. want to do it, it's normal use.  2 megs on a toaster Mac isn't enough
  608. to run Excel 3.0, for example.  Seems pretty normal to me.  And that's
  609. not even stopping to contemplate MPW...
  610.  
  611. - -------
  612. Christopher Tate                 |  Cryptogram #5:
  613. cxt105@psuvm.psu.edu             |
  614. CXT105@PSUVM.BITNET              |  "BYNXMQC, QHVNXZ.  QNRX TYZZNHO
  615. - ---------------------------------|   EDSXO NO H ANXQV XHMNOW GLXXZX,
  616. Send me the answer; I love mail! |   HOV HQQ MLHM."  (WQXX GQYK)
  617.  
  618. +++++++++++++++++++++++++++
  619.  
  620. From: ksand@apple.com (Kent Sandvik)
  621. Date: 24 Apr 92 01:22:00 GMT
  622. Organization: MacDTS Mongols
  623.  
  624. In article <92112.143943CXT105@psuvm.psu.edu>, CXT105@psuvm.psu.edu (Christopher
  625. Tate) writes:
  626. > In article <703876338.F00001@blkcat.UUCP>,
  627. > Jeffrey.Licht@p4212.f70.n109.z1.fidonet.org (Jeffrey Licht) says:
  628. > >
  629. > >  JH> Don't some people in memory low situations (e.g. 4 MB MacPlus and
  630. > >  JH> system 7) have
  631. > >
  632. > >You have a strange idea of a "low memory" situation.  4 megs on a toaster Mac
  633. s
  634. > >is
  635. > >quite enough for any kind of normal use.  2 megs, on the other hand...
  636. > Qu'a tu??
  637. > (Loose translation: "What kind of space drugs are you on?" :-)
  638. > I'd claim that it all depends on how you define "normal" use; I myself
  639. > tend to call just about anything "normal," by the argument that if I
  640. > want to do it, it's normal use.  2 megs on a toaster Mac isn't enough
  641. > to run Excel 3.0, for example.  Seems pretty normal to me.  And that's
  642. > not even stopping to contemplate MPW...
  643.  
  644. Same opinion. A user friendly application should not just stop due to
  645. lack of memory, it should at least try to presenta a dialog box telling
  646. about the state. Grep through the Macapp sources for possible 
  647. implementations of checking memory now and then.
  648.  
  649. Cheers,
  650. Kent
  651.  
  652. +++++++++++++++++++++++++++
  653.  
  654. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  655. Date: 25 Apr 92 20:06:12 GMT
  656. Organization: Dartmouth College, Hanover, NH
  657.  
  658. Perhaps you should try working with 600 dpi bitmaps.
  659.  
  660. Jeremiah
  661.  
  662. ---------------------------
  663.  
  664. Organization: Carnegie Mellon, Pittsburgh, PA
  665. Date: Wed, 22 Apr 1992 20:46:12 -0400 
  666. From: Alison Rebecca Colman <ac10+@andrew.cmu.edu>
  667. Subject: Creating interface -- help!!!
  668.  
  669. Hello everybody,
  670.  
  671. I am creating the icons and interface using ThinkC and ResEdit for a
  672. mechanical engineering project. I have already created the menu bar and
  673. what I need to do now is create the toolbox that is most often present
  674. on the left side of the screen in most programs. The literature I have
  675. (Inside Macintosh, volume 1) does not tell me how to do this, andI could
  676. not find anything in my school library,so the question I have is: does
  677. anyone out there know of any books that would give me the information I
  678. need, or have any code that would help me get started? Also, does anyone
  679. out there know where I would get information on how to make the "drag
  680. and drop" routine for the icons? Thank you all very much in advance! By
  681. the way, if my questioning is too vague, please let me know and I will
  682. answer all questions.
  683.  
  684. Cheers,
  685. Alison
  686.  
  687. +++++++++++++++++++++++++++
  688.  
  689. From: edw@caligula.cts.com (Ed Watkeys)
  690. Date: Thu, 23 Apr 92 09:09:35 EDT
  691. Organization: Guerrilla Networking Project
  692.  
  693.  
  694. In article <EdxUXIG00WBNA8StgW@andrew.cmu.edu> (comp.sys.mac.programmer), Alison Rebecca Colman <ac10+@andrew.cmu.edu> writes:
  695. > Hello everybody,
  696. > Also, does anyone
  697. > out there know where I would get information on how to make the "drag
  698. > and drop" routine for the icons?
  699. > Cheers,
  700. > Alison
  701.  
  702. If you're referring to dragging and dropping documents onto the Finder Icon
  703. for your application, then you want to make an FREF resource, which describes
  704. what types of files can be dropped onto your application. I don't know if
  705. this is the official use of an FREF is, but that's what it has done for me.
  706.  
  707.  
  708. - --
  709. Ed Watkeys (Drexel U. Comp Sci)  "Moral judgement and condemnation is
  710. edw@caligula.cts.com              the favorite form of revenge for the
  711. edw%caligula@phlpa.pha.pa.us      spiritually limited on those who are
  712. ls.com!phlpa!caligula!edw         less so...." -- Friedrich Nietzsche
  713.  
  714. +++++++++++++++++++++++++++
  715.  
  716. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  717. Date: 25 Apr 92 20:59:49 GMT
  718. Organization: Dartmouth College, Hanover, NH
  719.  
  720. In article <EdxUXIG00WBNA8StgW@andrew.cmu.edu>
  721. ac10+@andrew.cmu.edu (Alison Rebecca Colman) writes:
  722.  
  723. > I have already created the menu bar and
  724. > what I need to do now is create the toolbox that is most often present
  725. > on the left side of the screen in most programs.
  726.  
  727. I think what you're refering to is the toolbox in programs like
  728. MacPaint and Canvas. If so, here goes. The document window is not
  729. really a window, but a dialog. (I know, it is in fact a window, but not
  730. from the standpoint of Jane Q. Programmer.) The toolbox is a bunch of
  731. active PICT resources. When the user clicks on one, you should use
  732. InvertRect (QuickDraw call) on the rect of the PICT. I suggest that you
  733. look at the resources of a program that uses this for more info. All of
  734. this is documented in Inside Mac vol. 1, although you have to look for
  735. it. If you want additional help, you can send me e-mail.
  736.  
  737. hope this helps,
  738. Jeremiah
  739. JerBl@Dartmouth.edu
  740.  
  741. ---------------------------
  742.  
  743. From: skrans@pnet51.orb.mn.org (Steve Krans)
  744. Subject: mpw 3.2 c++/cfront 2.0 question
  745. Date: 23 Apr 92 02:45:10 GMT
  746. Organization: People-Net [pnet51], Minneapolis, MN.
  747.  
  748. In the midst of learning c++, I came across an mpw oddity that works just fine
  749. on Borland's Turbo c++.  I was wondering if anyone could offer an explanation
  750. of the following:
  751.  
  752. with the code:
  753. - --------------
  754. #include <stdio.h>
  755. #include <iostreams.h>
  756.  
  757. int
  758. main()
  759. {
  760.    int i=0;
  761.  
  762.    cout << "line1\n";
  763.    scanf("%d",i);
  764.    cout << "line2\n";
  765.    scanf("%d",i);
  766. }
  767. - --------------
  768. will first input the two integers, then output my line1 & line2 like:
  769.  
  770. 12<cr>
  771. 13<cr>
  772. line1
  773. line2
  774.  
  775. I've also had problems with:
  776. - --------------
  777. #include <stdio.h>
  778. #include <iostreams.h>
  779.  
  780. int
  781. main()
  782. {
  783.    int i=0;
  784.    cout << "\ninput:";          // cout << "\ninput:\n"; will work, however
  785.    cin >> i;
  786.    cout << i << "\n";
  787.  }
  788. - --------------
  789. will always cout 0 for i.   I'm using mpw 3.2 c++/cfront 2.0.  thanks for any
  790. help.  
  791.  
  792. ___________________________                            
  793. Steve Krans, Minneapolis MN
  794. INET: skrans@pnet51.orb.mn.org
  795. UUCP: {tcnet, crash, quest}!orbit!pnet51!skrans
  796.  
  797. +++++++++++++++++++++++++++
  798.  
  799. From: trimper@edsi.plexus.COM (Greg Trimper)
  800. Date: 23 Apr 92 19:04:40 GMT
  801. Organization: Enterprise Data Systems Incorporated, Appleton WI
  802.  
  803. skrans@pnet51.orb.mn.org (Steve Krans) writes:
  804.  
  805. >with the code:
  806. >--------------
  807. >#include <stdio.h>
  808. >#include <iostreams.h>
  809.  
  810. First off, in MPW, this is <iostream.h>
  811.  
  812. However, your exampls work fine when built as a SIOW app.  I have
  813. had problems trying to use scanf in  non-siow applications, but that
  814. is probably due to its non-mac functioning.
  815.  
  816.  
  817. Greg Trimper   trimper@edsi.plexus.com  
  818.  
  819. +++++++++++++++++++++++++++
  820.  
  821. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  822. Date: 23 Apr 92 15:45:57 GMT
  823. Organization: University of Illinois at Urbana
  824.  
  825. skrans@pnet51.orb.mn.org (Steve Krans) writes:
  826. >int
  827. >main()
  828. >{
  829. >   int i=0;
  830.  
  831. >   cout << "line1\n";
  832. >   scanf("%d",i);
  833. >   cout << "line2\n";
  834. >   scanf("%d",i);
  835. >}
  836. >will first input the two integers, then output my line1 & line2 like:
  837.  
  838. >12<cr>
  839. >13<cr>
  840. >line1
  841. >line2
  842.  
  843. I think it's that cout is buffered.
  844.  
  845. >int
  846. >main()
  847. >{
  848. >   int i=0;
  849. >   cout << "\ninput:";          // cout << "\ninput:\n"; will work, however
  850. >   cin >> i;
  851. >   cout << i << "\n";
  852. > }
  853. >will always cout 0 for i.
  854.  
  855. MPW reuires input to be on it's own line. When you hit return (enter) it will
  856. send the entire line, including the prompt, to cin. Thus you cannot have any
  857. prompts without newlines. I don't know if SIOW changes this.
  858. - -- 
  859. Mark Lanett, Software Tools Group, NCSA; mlanett@uiuc.edu; NCSA.STG (AppleLink)
  860.  
  861. ---------------------------
  862.  
  863. From: jcocon@hubcap.clemson.edu (james c oconnor)
  864. Subject: Think Reference Question (Experiences?)
  865. Organization: Clemson University
  866. Date: Thu, 23 Apr 1992 20:15:02 GMT
  867.  
  868. I am thinking about getting Think Reference.  Does anyone out there have
  869. it?  How much HD space does it take up?  How quick is it on your
  870. hardware?  I have a ci, will I be chewing my nails wishing for the
  871. hardcopy version?  How many volumes of IM does it cover?  I am trying to
  872. decide between buying them all hardcopy or Think Reference, hard disk
  873. space being somewhat problematic at the moment tends to make hard copy
  874. look better.
  875.  
  876. One last question, a while back I got an offer coupon from Think for a
  877. discounted price on Reference because I own Think C.  I am pretty sure
  878. that it is lost - (someone from Think who reads the net might be able to
  879. help me out here) what are the current deals for Think customers?
  880.  
  881. Jim
  882.  
  883. - -- 
  884. Democracy is two wolves and a sheep voting on what to have for lunch.
  885.  
  886. +++++++++++++++++++++++++++
  887.  
  888. From: andrews@sp1.csrd.uiuc.edu (John Andrews)
  889. Organization: UIUC Center for Supercomputing Research and Development
  890. Date: Thu, 23 Apr 92 21:00:51 GMT
  891.  
  892. jcocon@hubcap.clemson.edu (james c oconnor) writes:
  893.  
  894. >I am thinking about getting Think Reference.  Does anyone out there have
  895. >it?  How much HD space does it take up?  How quick is it on your
  896. >hardware?  I have a ci, will I be chewing my nails wishing for the
  897. >hardcopy version?  How many volumes of IM does it cover?  I am trying to
  898. >decide between buying them all hardcopy or Think Reference, hard disk
  899. >space being somewhat problematic at the moment tends to make hard copy
  900. >look better.
  901.  
  902. 1) Yes
  903. 2) 2.3 Meg
  904. 3) Very fast, even on a MacPlus
  905. 4) It is not a complete replacement for IM.  I use both.  The combination
  906.    is more powerful than either one alone.
  907. 5) Covers IM I-V (does not cover VI).  Leaves out some stuff from I-V.  The
  908.    only thing I miss is Sound Manager coverage.
  909.  
  910. If you can only get one, I would get the hardcopy (skip Vol III, it is
  911. pretty worthless).  MacZone has good prices on the set.
  912.  
  913. Otherwise, get both.  I have both, and it really saves me time.  
  914.  
  915. The only problem with getting Think Reference now is that it will probably
  916. be upgraded soon (this is only speculation on my part).  The mail order
  917. price is $59 or $69.  The upgrade price will probably be something like
  918. $49 (more speculation), which means that you will end up paying more than 
  919. necessary.
  920.  
  921. - --
  922. John Andrews (andrews@csrd.uiuc.edu) "He who dies with the shortest .sig, wins"
  923. Graduate Research Assistant, Center for Supercomputing R&D, Urbana, IL
  924.  
  925. +++++++++++++++++++++++++++
  926.  
  927. From: mwalker@wc.novell.com (Mel Walker)
  928. Organization: Novell, Inc. - Walnut Creek
  929. Date: Thu, 23 Apr 1992 22:39:54 GMT
  930.  
  931. In article <1992Apr23.210051.23749@csrd.uiuc.edu> andrews@sp1.csrd.uiuc.edu (John Andrews) writes:
  932. >jcocon@hubcap.clemson.edu (james c oconnor) writes:
  933. >
  934. >>I am thinking about getting Think Reference.  Does anyone out there have
  935. >>it?  How much HD space does it take up?  How quick is it on your
  936. >>hardware?  I have a ci, will I be chewing my nails wishing for the
  937. >>hardcopy version?  How many volumes of IM does it cover?  I am trying to
  938. >>decide between buying them all hardcopy or Think Reference, hard disk
  939. >>space being somewhat problematic at the moment tends to make hard copy
  940. >>look better.
  941. >
  942. >1) Yes
  943. >2) 2.3 Meg
  944. >3) Very fast, even on a MacPlus
  945. >4) It is not a complete replacement for IM.  I use both.  The combination
  946. >   is more powerful than either one alone.
  947. >5) Covers IM I-V (does not cover VI).  Leaves out some stuff from I-V.  The
  948. >   only thing I miss is Sound Manager coverage.
  949. >
  950. >If you can only get one, I would get the hardcopy (skip Vol III, it is
  951. >pretty worthless).  MacZone has good prices on the set.
  952. >
  953. >Otherwise, get both.  I have both, and it really saves me time.  
  954. >
  955. >The only problem with getting Think Reference now is that it will probably
  956. >be upgraded soon (this is only speculation on my part).  The mail order
  957. >price is $59 or $69.  The upgrade price will probably be something like
  958. >$49 (more speculation), which means that you will end up paying more than 
  959. >necessary.
  960. >
  961. It also doesn't have appletalk.
  962.  
  963. - --mel walker
  964.  
  965.  
  966. +++++++++++++++++++++++++++
  967.  
  968. From: cconstantine@galaxy.gov.bc.ca
  969. Date: 24 Apr 92 07:31:30 -0700
  970. Organization: BC Systems Corporation
  971.  
  972. In article <1992Apr23.201502.20152@hubcap.clemson.edu>, jcocon@hubcap.clemson.edu (james c oconnor) writes:
  973. > I am thinking about getting Think Reference.  Does anyone out there have
  974. > it?  How much HD space does it take up?  How quick is it on your
  975. > hardware?  I have a ci, will I be chewing my nails wishing for the
  976. > hardcopy version?  How many volumes of IM does it cover?  I am trying to
  977. > decide between buying them all hardcopy or Think Reference, hard disk
  978. > space being somewhat problematic at the moment tends to make hard copy
  979. > look better.
  980.  
  981. Actually, I am running THINK Reference on a Mac Plus (until my LC II gets here)
  982. with 4Mb RAM and it's slick as a whistle.  I enjoy it.  It's very fast.  The
  983. application itself is only 65K (I think, it's small at any rate) the Database
  984. on the other hand that it uses is over 2Mb!!! I think that it's a relatively
  985. small price to pay for a great product.  It covers IM I-V (not VI yet) plus
  986. most of the TechNotes that have been out as well as some code samples and good
  987. descriptions of what routines do.  It also covers the Gestalt Manager as well.
  988. All of the descriptions are in C but it supports Pascal copy & paste as well.
  989.  
  990. Here's something, to the folks at Symantec, When will IM VI be out for THINK
  991. Reference???!!!!! and will it also contain the latest (April 92)
  992. TechNotes???!!!  One more thing, a suggestion, you should be able to search on
  993. a specific TechNote if you like as well as some of the info being included for
  994. the procedure descriptions. For example, you should have another button in the
  995. window do index the TechNotes with their numbers and titles so that when
  996. reading a book that says "check out TechNote 120 - Off screen drawing" you can
  997. look at that _SPECIFICALLY_!!!
  998.  
  999. - -- 
  1000. Carl.Constantine@BCSystems.gov.bc.ca
  1001. Victoria, British Columbia, Canada
  1002.  
  1003.  
  1004. ---------------------------
  1005.  
  1006. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1007. Subject: Something to smirk about
  1008. Date: 24 Apr 92 12:22:02 +1200
  1009. Organization: University of Waikato, Hamilton, New Zealand
  1010.  
  1011. I've been catching up on my reading of PC Magazine after an absence of
  1012. several months, and I came across an interesting article about working
  1013. with 24-bit colour images under Windows 3.0 in the September 10 issue.
  1014.  
  1015. Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece,
  1016. and tried to display the result on a PS/2 Model 70 (20MHz 80386)
  1017. with an 8514/A display (8 bits per pixel). It took 50 seconds to
  1018. draw the image!
  1019.  
  1020. I've done a bit of messing about with 24-bit images on the Mac myself,
  1021. and I have *never* had to wait 50 seconds for one of that sort of size
  1022. to display, not even on an 8-bit screen, and not even with QuickDraw's
  1023. ditherCopy mode. And not even when my work machine was still a vintage
  1024. Mac II with a 16MHz 68020 CPU.
  1025.  
  1026. Moral: if you want to do colour work, you can forget Windows.
  1027.  
  1028. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1029. Computer Services Dept                     fax: +64-7-838-4066
  1030. University of Waikato            electric mail: ldo@waikato.ac.nz
  1031. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1032.  
  1033. +++++++++++++++++++++++++++
  1034.  
  1035. From: shall@yoda.eecs.wsu.edu (Sean Hall - CS460)
  1036. Date: 24 Apr 92 02:08:42 GMT
  1037. Organization: Washington State University
  1038.  
  1039. In article <1992Apr24.122202.7562@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1040. >I've been catching up on my reading of PC Magazine after an absence of
  1041. >several months, and I came across an interesting article about working
  1042. >with 24-bit colour images under Windows 3.0 in the September 10 issue.
  1043. >
  1044. >Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece,
  1045. >and tried to display the result on a PS/2 Model 70 (20MHz 80386)
  1046. >with an 8514/A display (8 bits per pixel). It took 50 seconds to
  1047. >draw the image!
  1048. >
  1049. >I've done a bit of messing about with 24-bit images on the Mac myself,
  1050. >and I have *never* had to wait 50 seconds for one of that sort of size
  1051. >to display, not even on an 8-bit screen, and not even with QuickDraw's
  1052. >ditherCopy mode. And not even when my work machine was still a vintage
  1053. >Mac II with a 16MHz 68020 CPU.
  1054. >
  1055. >Moral: if you want to do colour work, you can forget Windows.
  1056.    Gosh, just think how fast an Amiga is...
  1057. >
  1058. >Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1059. >Computer Services Dept                     fax: +64-7-838-4066
  1060. >University of Waikato            electric mail: ldo@waikato.ac.nz
  1061. >Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1062.  
  1063. +++++++++++++++++++++++++++
  1064.  
  1065. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1066. Date: 24 Apr 92 16:31:51 +1200
  1067. Organization: University of Waikato, Hamilton, New Zealand
  1068.  
  1069. In article <1992Apr24.020842.27856@serval.net.wsu.edu>, shall@yoda.eecs.wsu.edu (Sean Hall - CS460) writes:
  1070. >>Moral: if you want to do colour work, you can forget Windows.
  1071. >    Gosh, just think how fast an Amiga is...
  1072.  
  1073. My mistake, I forgot to make it clear I was talking about *real* colour here...
  1074.  
  1075. Lawrence
  1076.  
  1077. +++++++++++++++++++++++++++
  1078.  
  1079. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  1080. Date: 25 Apr 92 21:21:49 GMT
  1081. Organization: Dartmouth College, Hanover, NH
  1082.  
  1083. In article <1992Apr24.122202.7562@waikato.ac.nz>
  1084. ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1085.  
  1086. > Charles Petzold created a 628 * 392 pixel 24-bit scan of his niece,
  1087. > and tried to display the result on a PS/2 Model 70 (20MHz 80386)
  1088. > with an 8514/A display (8 bits per pixel). It took 50 seconds to
  1089. > draw the image!
  1090. (ommited stuff about how much faster the Mac is)
  1091. >Moral: if you want to do colour work, you can forget Windows.
  1092.  
  1093. I've used Windows; actually, it's only slightly more annoying than
  1094. command lines, and actually slower (on a color PS/2) than my Mac+.
  1095.  
  1096. Moral: if you want to do anything, you can forget Windows.
  1097.  
  1098. ---------------------------
  1099.  
  1100. From: ghammond@metz.une.oz.au (Gerard Hammond)
  1101. Subject: Determining the size of a file - SFGetfile
  1102. Date: 24 Apr 92 00:26:13 GMT
  1103.  
  1104. Could someone please explain how I can use the info from the
  1105. standard open file procedure (SFGetFile) to determine the size
  1106. of the selected file. Can it be done with the returned 'reply'
  1107. variable? I only need to know the approximate size of the data fork (
  1108. as I'm going to put a progress bar as the operation on the file proceeds)
  1109. Thanks in advance
  1110. Gerard Hammond
  1111. UNE, Armidale, Australia
  1112.  
  1113. +++++++++++++++++++++++++++
  1114.  
  1115. From: michaelp@calvin.usc.edu (Michael Peterson)
  1116. Date: 24 Apr 1992 13:13:45 -0700
  1117. Organization: University of Southern California, Los Angeles, CA
  1118.  
  1119.  
  1120. In article <825@grivel.une.oz.au>, ghammond@metz.une.oz.au (Gerard Hammond) writes:
  1121. |> Could someone please explain how I can use the info from the
  1122. |> standard open file procedure (SFGetFile) to determine the size
  1123. |> of the selected file. Can it be done with the returned 'reply'
  1124. |> variable? I only need to know the approximate size of the data fork (
  1125. |> as I'm going to put a progress bar as the operation on the file proceeds)
  1126. |> Thanks in advance
  1127. |> Gerard Hammond
  1128. |> UNE, Armidale, Australia
  1129.  
  1130. I use the PBGetCatInfo call and:
  1131.  
  1132.    theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk;
  1133.  
  1134. This will give you the data fork size. I think this is the same thing that
  1135. 'Get Info' does, except that if also checks the resource size:
  1136.  
  1137.    theSize = theSize + theCPB.hFileInfo.ioFlRLgLen - theCPB.hFileInfo.ioFlRStBlk
  1138.  
  1139. Anyway, hope this helps.
  1140.  
  1141.                         Michael L. Peterson
  1142.  
  1143. +++++++++++++++++++++++++++
  1144.  
  1145. From: keith@taligent.com (Keith Rollin)
  1146. Date: 25 Apr 92 02:50:48 GMT
  1147. Organization: Taligent
  1148.  
  1149. In article <kvgqvpINNjia@calvin.usc.edu>, michaelp@calvin.usc.edu (Michael
  1150. Peterson) writes:
  1151. > In article <825@grivel.une.oz.au>, ghammond@metz.une.oz.au (Gerard Hammond)
  1152. writes:
  1153. > |> Could someone please explain how I can use the info from the
  1154. > |> standard open file procedure (SFGetFile) to determine the size
  1155. > |> of the selected file. Can it be done with the returned 'reply'
  1156. > |> variable? I only need to know the approximate size of the data fork (
  1157. > |> as I'm going to put a progress bar as the operation on the file proceeds)
  1158. > |> Thanks in advance
  1159. > |> Gerard Hammond
  1160. > |> UNE, Armidale, Australia
  1161. > I use the PBGetCatInfo call and:
  1162. >    theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk;
  1163. > This will give you the data fork size. I think this is the same thing that
  1164. > 'Get Info' does, except that if also checks the resource size:
  1165. >    theSize = theSize + theCPB.hFileInfo.ioFlRLgLen -
  1166. theCPB.hFileInfo.ioFlRStBlk
  1167.  
  1168. Aipp! Michael, if you're using this in an actual program, you'd better look at
  1169. your results. Subtracting those two fields is like subtracting the Finder flags
  1170. from the creator type; they're totally different things.
  1171.  
  1172. All you need are the ioFlLgLen and ioFlRLgLen fields.
  1173.  
  1174. - --
  1175. Keith Rollin
  1176. Phantom Programmer
  1177. Taligent, Inc.
  1178.  
  1179.  
  1180. +++++++++++++++++++++++++++
  1181.  
  1182. From: michaelp@calvin.usc.edu (Michael Peterson)
  1183. Date: 26 Apr 92 00:07:40 GMT
  1184. Organization: University of Southern California, Los Angeles, CA
  1185.  
  1186.  
  1187.  
  1188. |> > I use the PBGetCatInfo call and:
  1189. |> > 
  1190. |> >    theSize = theCPB.hFileInfo.ioFlLgLen - theCPB.hFileInfe.ioFlStBlk;
  1191. |> >  
  1192. |> 
  1193. |> Aipp! Michael, if you're using this in an actual program, you'd better look at
  1194. |> your results. Subtracting those two fields is like subtracting the Finder flags
  1195. |> from the creator type; they're totally different things.
  1196. |> 
  1197. |> All you need are the ioFlLgLen and ioFlRLgLen fields.
  1198. |> 
  1199. |> --
  1200. |> Keith Rollin
  1201. |> Phantom Programmer
  1202. |> Taligent, Inc.
  1203. |> 
  1204.  
  1205. It seems that you might be correct.  The reason that I didn't notice the 
  1206. difference is the the ioFlStBlk is almost always zero.  I've run this program
  1207. on an entire 40 meg hard drive using these fields and gotten the same result as 'Get Info'.  In fact the only files the only files i've ever had problems with
  1208. was MPW Project files, and with that changes i still have problems with them.
  1209.  
  1210.     Michael Peterson
  1211.     USC - UCS - CST
  1212.  
  1213. ---------------------------
  1214.  
  1215. End of C.S.M.P. Digest
  1216. **********************
  1217.